<template>
    <div class="aside">
      <el-menu
        active-text-color="#ffd04b"
        background-color="#545c64"
        class="el-menu-vertical-demo"
        default-active="2"
        text-color="#fff"
        router
      >
        <el-menu-item :index="item.auth_path" v-for="item in acl" v-show="item.children.length == 0">
          <el-icon><House /></el-icon>
          <span>{{ item.auth_name }}</span>
        </el-menu-item>
        <el-sub-menu :index="item.auth_path" v-for="item in acl" v-show="item.children.length != 0">
          <template #title>
            <el-icon><Odometer /></el-icon>
            <span>{{ item.auth_name }}</span>
          </template>
            <el-menu-item :index="child.auth_path" v-for="child in item.children" v-show="child.is_nav == 1">
              <el-icon><Ship /></el-icon>
              <span>{{ child.auth_name }}</span>
            </el-menu-item>
        </el-sub-menu>
      </el-menu>
    </div>
</template>
<script setup>
import { House, Odometer,Ship} from '@element-plus/icons-vue'
import { defineProps } from 'vue';
const props = defineProps(['acl'])
</script>
<style lang='scss' scoped>
  .aside{
    height: 100%;
    .el-menu{
    height: 100%;
  }
  }
</style>